﻿
using hentity;
using hlog;
using System.Collections.Generic;
using System.Data;
namespace hdb {
    public interface IBaseServer
    {
        Page<T> queryPage<T>(string sql, string orderBy, PageDto param = null);//分页查询
        T getById<T>(long id, IDbTransaction transaction = null) where T : class;//根据id查询
        List<T> GetAll<T>( string whereStr=null,object param = null)where T : class;
        List<T> getAll<T>(string tableName, string whereStr = null ,object param = null,string orderField="") where T : class;
        List<T> GetField<T>(string fields ,string where = null ,object param = null) where T : class;
        long insert<T>(T t) where T : class;
        long insertNotNull<T>(T t) where T : class;
        void delete<T>(long id) where T : class;
        void delete<T> (string where,object param) where T : class;
        void delete(BaseEntity id) ;
        bool update<T>(T t) where T : class;
        bool updateNotNull<T>(T t) where T : class;
    }
}
